package com.thoughtmechanix.licenses.repository;

import com.thoughtmechanix.licenses.model.License;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 功能描述
 *
 * @author zgl
 * @version 1.0
 * @date 2019-07-26 17:33
 */
@Repository
public interface LicenseRepository  extends CrudRepository<License,String> {

    /**
     * find license lists by OrganizationId
     * @param organizationId
     * @return
     */
    List<License> findByOrAndOrganizationId(String organizationId);
    /**
     * find license  by OrganizationId  and licenseid
     * @param organizationId
     * @param licenseId
     * @return
     */
    License findByOrAndOrganizationIdAndId(String organizationId,String licenseId);

}
